Repository navigation
fix(desktop): restore custom icon when macOS Dock returns - #12336
Open
amanayayatu-tech wants to merge 2 commits into
Open
amanayayatu-tech wants to merge 2 commits into
amanayayatu-tech wants to merge 2 commits into
Conversation
Signed-off-by: Nepha Peachy <267095040+amanayayatu-tech@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] 本次改动范围明确,未发现阻止合并的问题。
|
Signed-off-by: Nepha Peachy <267095040+amanayayatu-tech@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这次改了什么
摘要
macOS Dock 在辅助窗口的进程类型转换后会重建磁贴。重建时可能显示安装包默认图标,此时 Cindy 内存里仍记着已经应用过的自定义资源路径。等现有 Dock 恢复流程完成后,清除这条缓存,用当前图标偏好和主题重新应用图标。
变更类型
fix缺陷修复范围
UI 变化
怎么验证的
自动验证
pnpm --filter desktop run --if-present typecheck通过。pnpm --dir apps/desktop exec vitest run --maxWorkers=1 src/main/computer-permission-guide/__tests__/electron-window.test.ts src/main/remote-desktop/__tests__/privacyScreen.test.ts通过,2 个文件共 71 项。git diff --check通过。手工验证
macOS 27.2.1 arm64,Electron 42.11.12。使用独立 bundle ID 和测试资料目录,通过 Cindy 的
updateAppearanceFromSettings设置图标,以同样的 Electron 全屏辅助窗转换产生真实 Dock 隐藏,关闭测试窗后走scheduleMainAppPresenceRestore。从 macOS Dock 窗口截图取测试磁贴像素,并记录 PID、appIcon和主题。辅助窗保持隐藏。cat保持不变,恢复后的磁贴像素两次均与安装包图标一致cat保持不变,恢复后的磁贴像素两次均与隐藏前黑猫一致mark对照浅色和跟随系统(深色)。两种主题显示不同资源,各自经 Dock 重建后像素一致仅在实际重显示分支多一次现有外观设置快照读取和一次自定义 PNG 应用,正常已可见路径为 0 次。整个恢复流程新增远程请求、IPC、持久化写或轮询均为 0。
F=10/10(受控转换修前 2/2 复现,用户日常遇到该转换的频率未知),S=2/10(图标显示错误,保存的用户偏好和当前进程仍正常)。
未执行的验证
没有运行完整远控会话或在第二台 Mac 上复测。测试使用实际 Dock 与生产恢复入口,辅助窗测试只复用生产 Electron 转换参数。
风险
影响与回滚
提交前检查